package com.wysql.thread.createthread1;

/**
 * 创建多线程方式1：继承Thread
 */
public class Demo {
    public static void main(String[] args) {
        MyThread myThread1 = new MyThread();
        MyThread myThread2 = new MyThread();

        myThread1.setName("熊大");
        myThread2.setName("熊二");

        //越大越能抢
        myThread1.setPriority(10);
        myThread2.setPriority(1);

        //守护线程 1完了你直接就没了
        myThread2.setDaemon(true);

        //表示的仅仅是创建对象,用对象去调用方法,并没有开启线程.
//        myThread1.run();
//        myThread2.run();
        myThread1.start();
        myThread2.start();
    }
}
